<!DOCTYPE html>
<html>
<head>
    <!-- 页面meta -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title></title>
    <meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport">
    <!-- 引入样式 -->
    <link rel="stylesheet" href="../plugins/elementui/index.css">
    <link rel="stylesheet" href="../plugins/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="../css/style.css">
    <style type="text/css">
    .el-main{
        position: absolute;
        top: 70px;
        bottom: 0px;
        left: 200px;
        right: 10px;
        padding: 0;
    }
    </style>
</head>
<body class="hold-transition skin-purple sidebar-mini">
    <div id="app">
        <el-container>
            <el-header  class="main-header" style="height:70px;">
                <nav class="navbar navbar-static-top" :class=''>
                    <!-- Logo -->
                    <a href="#" class="logo" style="text-align:center">
                        <span class="logo-lg"><img src=""></span>
                    </a>
                    <div class="right-menu">
                        <span class="help"><i class="fa fa-exclamation-circle" aria-hidden="true"></i>欢迎你:</span>
                        <el-dropdown class="avatar-container right-menu-item" trigger="click">
                            <div class="avatar-wrapper">
                                {{username}}
                            </div>
                            <el-dropdown-menu slot="dropdown">
                                <el-dropdown-item divided>
                                    <span style="display:block;">修改密码</span>
                                </el-dropdown-item>
                                <el-dropdown-item divided>
                                        <span style="display:block;">
                                            <a href="/logout.do">退出</a>
                                        </span>
                                    </el-dropdown-item>
                            </el-dropdown-menu>
                        </el-dropdown>
                    </div>
                </nav>
            </el-header>
            <el-container>
                <el-aside >
                    <el-menu height="580px" default-active="1"
                        class="el-menu-vertical-demo"
                        @open="handleOpen"
                        @close="handleClose"
                        background-color="#545c64"
                        text-color="#fff"
                        active-text-color="#ffd04b">                
                    <el-menu-item index="1">
                        <i class="el-icon-menu"></i>
                        <span slot="title"><a href="student_one.html" target="right">完善信息/签到</a></span>
                    </el-menu-item>
                    <el-menu-item index="2">
                        <i class="el-icon-document"></i>
                        <span slot="title"><a href="student_dormitory.html" target="right">寝室选择</a></span>
                    </el-menu-item>
                    <!--<el-menu-item index="3">
                        <i class="el-icon-document"></i>
                        <span slot="title"><a href="checkgroup.html" target="right">办校园卡</a></span>
                    </el-menu-item>-->
                    <el-menu-item index="4">
                        <i class="el-icon-setting"></i>
                        <span slot="title"><a href="student_password.html" target="right">修改密码</a></span>
                    </el-menu-item>
                    <el-menu-item index="5">
                        <i class="el-icon-setting"></i>
                        <span slot="title"><a href="student_message.html" target="right">留言</a></span>
                    </el-menu-item>
                    </el-menu>
                </el-aside>
                <el-container>
                    <iframe name="right" class="el-main" src="student_one.html" height="700px"  frameborder="0"></iframe>
                </el-container>
            </el-container>
        </el-container>
    </div>
</body>
<!-- 引入组件库 -->
<script src="../js/vue.js"></script>
<script src="../plugins/elementui/index.js"></script>
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script src="../js/axios-0.18.0.js"></script>
<script>
    new Vue({
        el: '#app',
        data:{        
            username:null,
        },
        created(){
            var stuId = sessionStorage.getItem("stuId");
            if(stuId==null || stuId==""){
                console.log("你没有登录");
                location.href="stulogin.html";
                axios.get("/loginfalse/student").then(()=>{})
            }
            axios.get("/student/findByStuId?id="+stuId).then((response)=>{
                this.username = response.data.data.stuName;
            })
        },
    })
    $(function() {
            var wd = 200;
            $(".el-main").css('width', $('body').width() - wd + 'px');
    });
</script>
<style>
    .el-menu-vertical-demo:not(.el-menu--collapse) {
      width: 200px;
      min-height: 700px;
    }
  </style>
</html>
